﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace NPuzzles_dynamiczne_kontrolki
{
    public delegate void  pbklik(int id);

    class MyPictureBox : PictureBox
    {
        public event pbklik wcisniety;
        public int doceloweid { set; get; }
        public int currentid { set; get; }

        public MyPictureBox(int id)
        {
            this.currentid = id;
            this.doceloweid = id;
            base.MouseClick += new MouseEventHandler(clik);
        }

        public MyPictureBox()
        {
        }

        private void clik(object sender, MouseEventArgs e)
        {
            this.wcisniety(this.currentid);
        }

    }
}
